Skip to content

Conversation

@andrewyuq
Copy link
Contributor

Problem

Solution


  • Treat all work as PUBLIC. Private feature/x branches will not be squash-merged at release time.
  • Your code changes must meet the guidelines in CONTRIBUTING.md.
  • License: I confirm that my contribution is made under the terms of the Apache 2.0 license.

@andrewyuq andrewyuq requested a review from a team as a code owner September 9, 2025 00:05
@github-actions
Copy link

github-actions bot commented Sep 9, 2025

  • This pull request modifies code in src/* but no tests were added/updated.
    • Confirm whether tests should be added or ensure the PR description explains why tests are not required.
  • This pull request implements a feat or fix, so it must include a changelog entry (unless the fix is for an unreleased feature). Review the changelog guidelines.
    • Note: beta or "experiment" features that have active users should announce fixes in the changelog.
    • If this is not a feature or fix, use an appropriate type from the title guidelines. For example, telemetry-only changes should use the telemetry type.

const inlineChatTutorialAnnotation = new InlineChatTutorialAnnotation(inlineTutorialAnnotation)

const enableInlineRollback = true
const enableInlineRollback = FeatureConfigProvider.instance.getPreFlareRollbackGroup() === 'treatment'
Copy link
Contributor

@leigaol leigaol Sep 9, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

when this line of code is invoked at the activation phrase, the feature config API has not been called and it won't know if it is treatment or not.

Can you do this:

  1. In the FeatureConfig provider, when it call getPreFlareRollbackGroup. If there is API response, if this response is not the same as disk cache, override disk cache. If the response is the same as disk cache. do nothing. If this getPreFlareRollbackGroup is called even before the listFeatureEvaluation API call, then just return from the cache.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I setup debug mode and it was called before this line, let me double check again

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2025-09-08 18:51:01.940 [info] AB Testing Cohort Assignments [
  {
    feature: 'PreflareRollbackExperiment_BID',
    variation: 'CONTROL',
    value: { stringValue: 'CONTROL' }
  }
]
2025-09-08 18:51:01.940 [debug] CodeWhisperer: Current feature configs: {PreflareRollbackExperiment_BID: CONTROL}
2025-09-08 18:51:03.182 [info] Command: (not started) [/Users/yuxqiang/Library/Caches/aws/toolkits/language-servers/AmazonQ/1.31.0/servers/node --inspect=6080 --max-old-space-size=8196 /Users/yuxqiang/Library/Caches/aws/toolkits/language-servers/AmazonQ/1.31.0/servers/aws-lsp-codewhisperer.js --nolazy --preserve-symlinks --stdio --pre-init-encryption --set-credentials-encryption-key] (running processes: 1)
2025-09-08 18:51:04.014 [debug] amazonqLsp: Fetching config section aws.q for language server
2025-09-08 18:51:04.014 [debug] amazonqLsp: Fetching config section aws.q for language server
2025-09-08 18:51:04.380 [debug] codewhisperer: new user login, activating inline tutorial. (autotriggerEnabled=true; inlineState=amazonq_annotation_inline_chat)
2025-09-08 18:51:04.380 [info] Entering postflare logic

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also:

// This contains every lsp agnostic things (auth, security scan, code scan)
    await activateCodeWhisperer(extContext as ExtContext)

    if (!isAmazonLinux2() || hasGlibcPatch()) {
        // Activate Amazon Q LSP for everyone unless they're using AL2 without the glibc patch
        await activateAmazonqLsp(context)
    }

activateCodeWhisperer will call fetchFeatureConfig once at the end, activateAmazonqLsp will deterine whether it goes the preflare or post flare path.

@leigaol leigaol merged commit 77676b3 into aws:feature/inline-rollback Sep 9, 2025
19 of 22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants